#include <iostream>

template <typename T1, typename T2>
class MyCalculator
{
private:
    T1 t1{};
    T2 t2{};

public:
    MyCalculator() {}
    MyCalculator(T1 t1, T2 t2) : t1(t1), t2(t2) {}

    void showMinus()
    {
        std::cout << t1 - t2 << std::endl;
    }

    void showSum()
    {
        std::cout << t1 + t2 << std::endl;
    }
};

void useCalculator1(MyCalculator<int, int> &cal)
{
    cal.showMinus();
    cal.showSum();
}

template <typename X, typename Y>
void useCalculator2(MyCalculator<X, Y> &cal)
{
    cal.showMinus();
    cal.showSum();
}

int main(int argc, char const *argv[])
{
    

    MyCalculator<int, int> cal{15, 16};
    cal.showMinus();
    cal.showSum();

    MyCalculator<double, double> cal2{13.33, 9.99};
    cal2.showMinus();
    cal2.showSum();

    useCalculator1(cal);
    useCalculator2(cal2);

    return 0;
}
